'\" te
.\" CDDL HEADER START
.\"
.\" The contents of this file are subject to the terms of the
.\" Common Development and Distribution License (the "License").
.\" You may not use this file except in compliance with the License.
.\"
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
.\" or http://www.opensolaris.org/os/licensing.
.\" See the License for the specific language governing permissions
.\" and limitations under the License.
.\"
.\" When distributing Covered Code, include this CDDL HEADER in each
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
.\" If applicable, add the following below this CDDL HEADER, with the
.\" fields enclosed by brackets "[]" replaced with your own identifying
.\" information: Portions Copyright [yyyy] [name of copyright owner]
.\"
.\" CDDL HEADER END
.\"
.\" Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
.\"
.\" -*- nroff -*-
.\"
.TH IBV_GID_REACHABLE 3 2012-08-08 libibverbs "Libibverbs Programmer's Manual"
.SH "NAME"
ibv_gid_reachable \- will contact the SA to do a path record lookup from the
device,port specified by 'context','port' to the remote 'gid_p'.  It finds the
status of the remote GID (reachable or unreachable).
.sp
.SH "SYNOPSIS"
.nf
.B #include <infiniband/verbs.h>
.sp
.BI "int ibv_gid_reachable(struct ibv_context *context, uint port,
.BI "union ibv_gid *gid_p, int timeout)
.if
.TP
.B gid_p
A pointer to the gid to check
.TP
.B context
A device context obtained from a call to ibv_open_device().
This identifies the device to use in order to contact the
remote 'gid_p'.
.TP
.B port
Specifies the port on the device associated with 'context'.
If '0' then the implementation will choose a port.
.TP
.B timeout
It is currently set to '0' and reserved for future enhancement.
ibv_gid_reachable() will block until a response
(success, fail or no path found) is obtained.
.sp
.SH "DESCRIPTION"
.B ibv_gid_reachable() will contact the SA from the device,port specified
by 'context','port' to the remote 'gid_p'.
It finds the status of the remote 'gid_p' (reachable or not).
.sp
.B ibv_gid_reachable()
returns 0 on success, -1 on failure with errno set as follows:
.sp
.TP
.in +10
.B EINVAL \fR\fR\fR Invalid argument.
.in -10
.TP
.in +10
.B ENXIO \fR\fR\fR No Path Found
.in -10
.TP
.in +10
.B EIO \fR\fR\fR I/O Error
.in -10
.TP
.in +10
.B ENOMEM \fR\fR\fR Could not allocate kernel resource
.in -10
.in +23
required to perform the lookup.
.in -23
.TP
.in +10
.B EINTR \fR\fR\fR Abort due to interrupted system call.
.in -10
.sp
.SH "RETURN VALUE"
.B ibv_gid_reachable()
returns 0 on success, and \-1 on error.
.sp
.SH "NOTES"
.TP
